<template>
	<j-cell-group :title="'通道' + index">
		<j-cell title="开启" :more="false">
			<view slot="tips">
				<switch :checked="AlarmNetIPConflict.Enable" disabled></switch>
			</view>
		</j-cell>
		<j-cell-card title="联动参数" :show="false" :is-touch="false" border style="background: #f5f7fb">
			<j-cell title="事件" :tips="AlarmNetIPConflict.EventHandler.EventLatch" :more="false"></j-cell>
			<j-cell title="事件时间段" :tips="AlarmNetIPConflict.EventHandler.TimeSection" :more="false"></j-cell>
			<j-cell title="录像通道掩码" :tips="AlarmNetIPConflict.EventHandler.RecordMask" :more="false"></j-cell>
			<j-cell title="录像" :more="false">
				<view slot="tips">
					<switch :checked="AlarmNetIPConflict.EventHandler.RecordEnable" disabled></switch>
				</view>
			</j-cell>
			<j-cell title="录像延时时间" :tips="AlarmNetIPConflict.EventHandler.RecordLatch" :more="false"></j-cell>
			<j-cell title="报警输出通道掩码" :tips="AlarmNetIPConflict.EventHandler.AlarmOutMask" :more="false"></j-cell>
			<j-cell title="报警输出" :more="false">
				<view slot="tips">
					<switch :checked="AlarmNetIPConflict.EventHandler.AlarmOutEnable" disabled></switch>
				</view>
			</j-cell>
			<j-cell title="报警输出延时时间" :tips="AlarmNetIPConflict.EventHandler.AlarmOutLatch" :more="false"></j-cell>
			<j-cell title="云台联动" :more="false">
				<view slot="tips">
					<switch :checked="AlarmNetIPConflict.EventHandler.PtzEnable" disabled></switch>
				</view>
			</j-cell>
			<j-cell title="云台联动项" :tips="AlarmNetIPConflict.EventHandler.PtzLink" :more="false"></j-cell>
			<j-cell title="轮询" :more="false">
				<view slot="tips">
					<switch :checked="AlarmNetIPConflict.EventHandler.TourEnable" disabled></switch>
				</view>
			</j-cell>
			<j-cell title="轮询掩码" :tips="AlarmNetIPConflict.EventHandler.TourMask" :more="false"></j-cell>
			<j-cell title="快照通道号掩码" :tips="AlarmNetIPConflict.EventHandler.SnapShotMask" :more="false"></j-cell>
			<j-cell title="抓图" :more="false">
				<view slot="tips">
					<switch :checked="AlarmNetIPConflict.EventHandler.SnapEnable" disabled></switch>
				</view>
			</j-cell>
			<j-cell title="本地消息框提示" :more="false">
				<view slot="tips">
					<switch :checked="AlarmNetIPConflict.EventHandler.TipEnable" disabled></switch>
				</view>
			</j-cell>
			<j-cell title="发送邮件" :more="false">
				<view slot="tips">
					<switch :checked="AlarmNetIPConflict.EventHandler.MailEnable" disabled></switch>
				</view>
			</j-cell>
			<j-cell title="上传到报警服务器" :more="false">
				<view slot="tips">
					<switch :checked="AlarmNetIPConflict.EventHandler.MessageEnable" disabled></switch>
				</view>
			</j-cell>
			<j-cell title="消息上传到网络" :more="false">
				<view slot="tips">
					<switch :checked="AlarmNetIPConflict.EventHandler.MsgtoNetEnable" disabled></switch>
				</view>
			</j-cell>
			<j-cell title="蜂鸣" :more="false">
				<view slot="tips">
					<switch :checked="AlarmNetIPConflict.EventHandler.BeepEnable" disabled></switch>
				</view>
			</j-cell>
			<j-cell title="语音提示" :more="false">
				<view slot="tips">
					<switch :checked="AlarmNetIPConflict.EventHandler.VoiceEnable" disabled></switch>
				</view>
			</j-cell>
			<j-cell title="联动视频矩阵通道掩码" :more="false">
				<view slot="tips">
					<switch :checked="AlarmNetIPConflict.EventHandler.MatrixEnable" disabled></switch>
				</view>
			</j-cell>
			<j-cell title="联动视频矩阵" :tips="AlarmNetIPConflict.EventHandler.MatrixMask" :more="false"></j-cell>
			<j-cell title="日志" :more="false">
				<view slot="tips">
					<switch :checked="AlarmNetIPConflict.EventHandler.LogEnable" disabled></switch>
				</view>
			</j-cell>
			<j-cell title="Ftp上传" :more="false">
				<view slot="tips">
					<switch :checked="AlarmNetIPConflict.EventHandler.FtpEnable" disabled></switch>
				</view>
			</j-cell>
			<j-cell title="语音提示类型" :tips="AlarmNetIPConflict.EventHandler.VoiceType" :more="false"></j-cell>
		</j-cell-card>
	</j-cell-group>
</template>

<script>
	export default {
		data() {
			return {
				token: '',
				AlarmNetIPConflict: {
					Enable: '',

					EventHandler: {
						EventLatch: '',
						TimeSection: '',
						RecordMask: '',
						RecordEnable: '',
						RecordLatch: '',
						AlarmOutMask: '',
						AlarmOutEnable: '',
						AlarmOutLatch: '',
						PtzEnable: '',
						PtzLink: '',
						TourEnable: '',
						TourMask: '',
						SnapShotMask: '',
						SnapEnable: '',
						TipEnable: '',
						MailEnable: '',
						MessageEnable: '',
						MsgtoNetEnable: '',
						BeepEnable: '',
						VoiceEnable: '',
						MatrixEnable: '',
						MatrixMask: '',
						LogEnable: '',
						FtpEnable: '',
						VoiceType: ''
					}
				}
			};
		}
		/**
		 * 生命周期函数--监听页面加载
		 */
		,
		onLoad: function(options) {
			console.log(options);
			this.token = options.token
			this.getconfig();
		},
		/**
		 * 生命周期函数--监听页面初次渲染完成
		 */
		onReady: function() {},
		/**
		 * 生命周期函数--监听页面显示
		 */
		onShow: function() {},
		/**
		 * 生命周期函数--监听页面隐藏
		 */
		onHide: function() {},
		/**
		 * 生命周期函数--监听页面卸载
		 */
		onUnload: function() {},
		/**
		 * 页面相关事件处理函数--监听用户下拉动作
		 */
		onPullDownRefresh: function() {},
		/**
		 * 页面上拉触底事件的处理函数
		 */
		onReachBottom: function() {},
		/**
		 * 用户点击右上角分享
		 */
		onShareAppMessage: function() {},
		methods: {
			getconfig() {
				uni.showLoading();
				let token = this.token;
				let data = {
					Name: 'Alarm.NetIPConflict'
				};
				getApp().globalData.api.getconfig(data, token, (result) => {
					uni.hideLoading({
						success: (res) => {
							console.log(result);
							this.AlarmNetIPConflict = result['Alarm.NetIPConflict']
						}
					});
				});
			}
		}
	};
</script>
<style></style>
